package edu.berkeley.cs160.innovationers.shoppersidekick.model;

/**
 * The definition of the ListModel interface. This class should be implemented by
 * both the server and the client for consistency.
 * 
 * @author Nadir Muzaffar
 *
 */
public interface ListModelDefinition {
	/**
	 * 
	 * @return String which is this list's name.
	 */
	public String getListName();
	
	/**
	 * 
	 * @return all items currently in this list or NULL if list has no items.
	 */
	public ListItemModelDefinition[] getListItems();
	
	/**
	 * 
	 * @param listItem
	 * @return true of ListItem was successfully added, false otherwise.
	 */
	public boolean addListItemToList( ListItemModelDefinition listItem );
	
	/**
	 * 
	 * @param listItem
	 * @return true if removed successfully, false otherwise.
	 */
	public boolean removeListItemFromList( ListItemModelDefinition listItem );
	
	/**
	 * Associates a user to this list so that a given user can modify it. 
	 * @return true if added false if unable to add user to list.
	 */
	public boolean addUserToList( UserModelDefinition user);
	
	/**
	 * 
	 * @param user
	 * @return true if the user was successfully removed and false otherwise.
	 */
	public boolean removeUserFromList(UserModelDefinition user);
	
	/**
	 * 
	 * @return all users which are associated with this list.
	 */
	public UserModelDefinition[] getListUsers();
}
